In any industry that transports its goods using pipelines, sediments are a major problem. In the oil industry, for example, it is often necessary to clean slurry out of pipelines in order to maintain their capacity and to prevent erosion of the pipelines and downstream equipment. The sediments can arrive in the liquid or gas being transported, or they can enter the pipe through breaks in the structure. The cleaning of a pipe is commonly done using Pipeline Inspection Gauges (PIGs), which are also used to determine the levels of slurry. This process disrupts the normal use of the pipeline and costs a great deal of time and money. Being able to effectively monitor the levels of contaminants in a pipe would allow the operators to manage its use more effectively, since they would be able to judge more accurately the best time to clear the pipe. Moreover, when detecting contaminants in an oil pipeline, for example, the oil extraction method can be adapted to reduce the amount of contaminants in the oil.